let Mock=require('mockjs')
let fs=require('fs')

let data=Mock.mock({
    "data|5":[{
        img:"@image(30x30，@color)",
        name:"@cword(3,8)",
        price:/\d{1,3}/,
        count:/\d{1,2}/
    }]
})
fs.writeFileSync('./goods.json',JSON.stringify(data.data))